﻿using UnityEngine;

namespace Yoozoo.Gameplay.RTS
{
    public class GpuSkinningHandle : MonoBehaviour
    {
        public GPUInstancingManager manager;
        public bool isSurvivor;
        public Rect rect = new Rect(Screen.width - 300, 500, 200, 50);

        void Start()
        {
            manager = GPUInstancingManager.GetInstance();
            manager.Initialize();
        }

        void Update()
        {
            GPUInstancingManager.GetInstance().Update();
        }

        private void OnDestroy()
        {
            if (manager != null)
                manager.Dispose();
            manager = null;
        }

#if DEBUG_GPU_SKINNING
        private void OnGUI()
        {
            GPUInstancingManager.GetInstance().OnGUI(rect);
        }
#endif
    }
}
